package AcWing周赛;

import java.util.*;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: a
 * Date: 2022-09-10
 * Time: 19:53
 */
public class Demo68_3 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        int len = s.length();
        Set<Integer> set = new HashSet<>();
        ArrayList<String> list = new ArrayList<>();
        for(int i = 0; i < len; i++){
            if(s.charAt(i) == '\"'){
                set.add(i);
            }
        }
        for(int i = 0; i < len; i++){
            int j = i;
            for(j = i; j < len; j++){
                if(set.contains(j)){
                    break;
                }
            }
            String[] str = s.substring(i, j).split(" ");
            int k = 0;
            for(k = 0; k < str.length; k++){
                list.add(str[k]);
            }
            for(k = j + 1; k < len; k++){
                if(set.contains(k)){
                    list.add(s.substring(j + 1, k));
                    break;
                }
            }
            i = k;
        }
        int size = list.size();
        System.out.println(size);
        for(int i = 0; i < size; i++){
            System.out.println(list.get(i));
        }
    }
}
